from flask import Flask, current_app, flash, get_flashed_messages

app = Flask(__name__)
app.secret_key = 'yoyo'

@app.route('/login')
def login():
    flash('welcome to back!')
    return {'msg': 'ok'}

@app.route('/get')
def get():
    msg = get_flashed_messages()
    return {'msg': msg}

if __name__ == '__main__':
    app.run()